﻿using Microsoft.AspNetCore.Connections;
using SH.Common;
using SH.Common.CommonReturn;
using SH.Multitenant.Application.IServices.ITenant;
using SH.Multitenant.Domain.Multitenant;
using SH.Multitenant.Infrastructure.IRepository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Transactions;

namespace SH.Multitenant.Application.Services
{
    public class TenantServices : ITenantServices
    {
        private readonly ITenantRepository _tenantRepository;

        public TenantServices(ITenantRepository tenantRepository)
        {
            _tenantRepository = tenantRepository;
        }
        //租户添加
        public async Task<ApiResult<int>> TenantAddAsync(TenantDTO tenantInfo)
        {
            return await _tenantRepository.TenantAddAsync(tenantInfo);
        }
    }
}
